<?php
session_start();

include_once "src/controller/regmanagement/AccountManager.php";
include_once "src/model/Consultant.php";
include_once "src/model/ProvidedService.php";
//sleep(3);
try {
    if (AccountManager::deleteUserAccount($_POST["oldFirstName"], $_POST["oldLastName"],
                                          $_SESSION["email"], $_POST["accountCreationDate"])) {
        unset ($_SESSION["email"]);
        unset ($_SESSION["userFullName"]);
        echo "1";
    } else {
        echo "0";
    }
} catch (Exception $e) {
    echo $e->getMessage();
}
?>
